package tk.mybatis.springboot.mapper;

import java.util.Date;
import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.SelectProvider;

import tk.mybatis.springboot.mapper.Provider.LeavingmessageProvider;
import tk.mybatis.springboot.model.Leavingmessage;
import tk.mybatis.springboot.model.LeavingmessageExtend;
import tk.mybatis.springboot.share.MyMapper;

public interface LeavingmessageMapper extends MyMapper<Leavingmessage>{
	public List<Leavingmessage> findLeavingmessageAll();
	
	@SelectProvider(type=LeavingmessageProvider.class,method="findLeavingmessageList")
	public List<LeavingmessageExtend> findLeavingmessageList(@Param("userName") String userName, @Param("context") String context,
			 @Param("contextDateBegin") Date contextDateBegin, @Param("contextDateEnd") Date contextDateEnd, @Param("status") Integer status);
	
	@SelectProvider(type=LeavingmessageProvider.class,method="findLeavingmessageCount")
	public Integer findLeavingmessageCount(@Param("userName") String userName, @Param("context") String context,
			 @Param("contextDateBegin") Date contextDateBegin, @Param("contextDateEnd") Date contextDateEnd, @Param("status") Integer status);
}
